package com.ruoyi.fireman.service.impl;

import java.util.List;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.fireman.mapper.TImagePositionMapper;
import com.ruoyi.fireman.domain.TImagePosition;
import com.ruoyi.fireman.service.ITImagePositionService;
import com.ruoyi.common.core.text.Convert;

/**
 * 图片位置Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-08-30
 */
@Service
public class TImagePositionServiceImpl extends ServiceImpl<TImagePositionMapper, TImagePosition> implements ITImagePositionService
{
    @Autowired
    private TImagePositionMapper tImagePositionMapper;

    /**
     * 查询图片位置
     * 
     * @param id 图片位置主键
     * @return 图片位置
     */
    @Override
    public TImagePosition selectTImagePositionById(Long id)
    {
        return tImagePositionMapper.selectTImagePositionById(id);
    }

    /**
     * 查询图片位置列表
     * 
     * @param tImagePosition 图片位置
     * @return 图片位置
     */
    @Override
    public List<TImagePosition> selectTImagePositionList(TImagePosition tImagePosition)
    {
        return tImagePositionMapper.selectTImagePositionList(tImagePosition);
    }

    @Override
    public List<TImagePosition> selectTImagePositionListLikePosition(TImagePosition tImagePosition) {
        return tImagePositionMapper.selectTImagePositionListLikePosition(tImagePosition);
    }

    /**
     * 新增图片位置
     * 
     * @param tImagePosition 图片位置
     * @return 结果
     */
    @Override
    public int insertTImagePosition(TImagePosition tImagePosition)
    {
        tImagePosition.setCreateTime(DateUtils.getNowDate());
        return tImagePositionMapper.insertTImagePosition(tImagePosition);
    }

    /**
     * 修改图片位置
     * 
     * @param tImagePosition 图片位置
     * @return 结果
     */
    @Override
    public int updateTImagePosition(TImagePosition tImagePosition)
    {
        return tImagePositionMapper.updateTImagePosition(tImagePosition);
    }

    /**
     * 批量删除图片位置
     * 
     * @param ids 需要删除的图片位置主键
     * @return 结果
     */
    @Override
    public int deleteTImagePositionByIds(String ids)
    {
        return tImagePositionMapper.deleteTImagePositionByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除图片位置信息
     * 
     * @param id 图片位置主键
     * @return 结果
     */
    @Override
    public int deleteTImagePositionById(Long id)
    {
        return tImagePositionMapper.deleteTImagePositionById(id);
    }
}
